home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / editor / 3dvw95.zip / OEMSETNT.INF < prev    next >
INI File  |  1995-10-31  |  19KB  |  565 lines

  1. ;-----------------------------------------------------------------------
  2. ; OPTION TYPE
  3. ; -----------
  4. ; This identifies the Option type we are dealing with.  The different
  5. ; possible types are:
  6. ;
  7. ; COMPUTER, VIDEO, MOUSE, KEYBOARD, LAYOUT, SCSI, PRINTER, ...
  8. ;-----------------------------------------------------------------------
  9.  
  10. [Identification]
  11.     OptionType = VIDEO
  12.  
  13. ;-----------------------------------------------------------------------
  14. ; LANGUAGES SUPPORTED
  15. ; -------------------
  16. ;
  17. ; The languages supported by the OEM INF, For every language supported
  18. ; we need to have a separate text section for every displayable text
  19. ; section.
  20. ;
  21. ;-----------------------------------------------------------------------
  22.  
  23. [LanguagesSupported]
  24.     ENG
  25.  
  26. ;-----------------------------------------------------------------------
  27. ; OPTION LIST
  28. ; -----------
  29. ; This section lists the OEM Option key names.  These keys are locale
  30. ; independent and used to represent the option in a locale independent
  31. ; manner.
  32. ;
  33. ;-----------------------------------------------------------------------
  34.  
  35. ;
  36. ; Option list order: Option = Miniport driver, BitsPerPel, XResolution, YResolution, VRefresh, Interlaced
  37. ;
  38. ; If you don't want to create a VRefresh or Interlaced value under the service
  39. ; parameters then use the value ""
  40. ;
  41.  
  42. [Options]
  43.     "Creative 3D Blaster" = c3dnt,   8, 640,  480, 60, 0
  44.  
  45. ;
  46. ; This maps detected options into the options we support
  47. ;
  48. ; Format: DetectedOption = MappedOption
  49. ;
  50.  
  51. [MapOfOptions]
  52.     "VGA"            = "VGA"
  53.     "COMPAQ AVGA"        = "VGA"
  54.     "COMPAQ AGB"        = "VGA"
  55.     "8514 MONITOR UNKNOWN"    = "VGA"
  56.     "8514 VGA MONITOR"        = "VGA"
  57.     "8514 8503 MONO"            = "VGA"
  58.     "8514 8514 GAD"             = "VGA"
  59.     "GENOA VGA"                 = "VGA"
  60.     "VIDEO7 VGA DRAM"           = "VIDEO7 VGA VRAM 640x480x4"
  61.     "VIDEO7 VGA VRAM"           = "VIDEO7 VGA VRAM 640x480x4"
  62.     "TRIDENT VGA"               = "VGA"
  63.     "TRIDENT VGA 9100"          = "VGA"
  64.     "PARADISE VGA"              = "VGA"
  65.     "PARADISE VGA PROM"         = "VGA"
  66.     "PARADISE VGA CHIP 1F"      = "VGA"
  67.     "ATI VGA"                   = "VGA"
  68.     "ATI VGA WONDDER3"          = "VGA"
  69.     "TSENGLAB VGA ET3000"       = "VGA"
  70.     "TSENGLAB VGA ET4000"       = "TSENGLAB VGA ET4000 640x480x4x60"
  71.     "CIRRUS VGA"                = "VGA"
  72.     "CIRRUS VGA 610-620 REVC"   = "VGA"
  73.     "XGA"                       = "XGA 640x480x8"
  74.     "DELL DGX"                  = "DELL DGX 640x480x8"
  75.     "S3 VGA"                    = "S3 VGA 640x480x8"
  76.     "PRODESIGNER II"            = "TSENGLAB VGA ET4000 640x480x4x60"
  77.  
  78.  
  79. ;
  80. ; Order of the information:
  81. ;
  82. ; Port driver = Type, Group, ErrorControl, Tag, InstalledDisplay, VgaCompatible( 0/1 ), EventMessageFile, TypesSupported
  83. ;
  84.  
  85. [MiniportDrivers]
  86.     c3dnt   = !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_NORMAL, 11,  {c3dnt}, 0 , %SystemRoot%\System32\IoLogMsg.dll , 7
  87.  
  88.  
  89. ;-----------------------------------------------------------------------
  90. ; OPTION TEXT SECTION
  91. ; -------------------
  92. ; These are text strings used to identify the option to the user.  There
  93. ; are separate sections for each language supported.  The format of the
  94. ; section name is "OptionsText" concatenated with the Language represented
  95. ; by the section.
  96. ;
  97. ;-----------------------------------------------------------------------
  98.  
  99. [OptionsTextENG]
  100.   "Creative 3D Blaster" = "Creative 3D Blaster (default setting)"
  101.   ;"Creative 3D Blaster" = "Creative 3D Blaster (640 by 480 pixels, 256 colors, 60 Hertz)"
  102.  
  103. ;---------------------------------------------------------------------------
  104. ; 1. Identify
  105. ;
  106. ; DESCRIPTION:   To verify that this INF deals with the same type of options
  107. ;                as we are choosing currently.
  108. ;
  109. ; INPUT:         None
  110. ;
  111. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL
  112. ;                $($R1): Option Type (COMPUTER ...)
  113. ;                $($R2): Diskette description
  114. ;---------------------------------------------------------------------------
  115.  
  116. [Identify]
  117.     ;
  118.     ;
  119.     read-syms Identification
  120.  
  121.     set Status     = STATUS_SUCCESSFUL
  122.     set Identifier = $(OptionType)
  123.     set Media      = #("Source Media Descriptions", 1, 1)
  124.  
  125.     Return $(Status) $(Identifier) $(Media)
  126.  
  127.  
  128.  
  129. ;------------------------------------------------------------------------
  130. ; 2. ReturnOptions:
  131. ;
  132. ; DESCRIPTION:   To return the option list supported by this INF and the
  133. ;                localised text list representing the options.
  134. ;
  135. ;
  136. ; INPUT:         $($0):  Language used. ( ENG | FRN | ... )
  137. ;
  138. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL |
  139. ;                                STATUS_NOLANGUAGE
  140. ;                                STATUS_FAILED
  141. ;
  142. ;                $($R1): Option List
  143. ;                $($R2): Option Text List
  144. ;------------------------------------------------------------------------
  145.  
  146. [ReturnOptions]
  147.     ;
  148.     ;
  149.     set Status        = STATUS_FAILED
  150.     set OptionList     = {}
  151.     set OptionTextList = {}
  152.  
  153.     ;
  154.     ; Check if the language requested is supported
  155.     ;
  156.     set LanguageList = ^(LanguagesSupported, 1)
  157.     Ifcontains(i) $($0) in $(LanguageList)
  158.         goto returnoptions
  159.     else
  160.         set Status = STATUS_NOLANGUAGE
  161.         goto finish_ReturnOptions
  162.     endif
  163.  
  164.     ;
  165.     ; form a list of all the options and another of the text representing
  166.     ;
  167.  
  168. returnoptions = +
  169.     set OptionList     = ^(Options, 0)
  170.     set OptionTextList = ^(OptionsText$($0), 1)
  171.     set Status         = STATUS_SUCCESSFUL
  172.  
  173. finish_ReturnOptions = +
  174.     Return $(Status) $(OptionList) $(OptionTextList)
  175.  
  176.  
  177.  
  178. ;---------------------------------------------------------------------------
  179. ; MapToSupportedOption
  180. ;
  181. ; DESCRIPTION:   To map a hardware detected option to the NT Supported
  182. ;                option which represents it.
  183. ;
  184. ; INPUT:         $($0): Option
  185. ;
  186. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL
  187. ;                $($R1): Mapped Option
  188. ;
  189. ;---------------------------------------------------------------------------
  190.  
  191. [MapToSupportedOption]
  192.     ;
  193.     set Status = STATUS_FAILED
  194.     set MappedOption = $($0)
  195.  
  196.     ;
  197.     ; If the option is one we can support using one of our standard options
  198.     ; then map it to the standard option else map it to the default option
  199.     ; which is VGA.
  200.     ;
  201.  
  202.     set OptionList = ^(MapOfOptions, 0)
  203.     ifcontains $($0) in $(OptionList)
  204.         set MappedOption = #(MapOfOptions, $($0), 1)
  205.     else
  206.         set MappedOption = "VGA"
  207.     endif
  208.  
  209.     set Status = STATUS_SUCCESSFUL
  210.     Return $(Status) $(MappedOption)
  211.  
  212.  
  213.  
  214. [ServicesEntry]
  215.     CurrentEntry = "" ? $(!LIBHANDLE) GetDevicemapValue Video \Device\Video0
  216.  
  217.  
  218. ;
  219. ; InstallOption:
  220. ;
  221. ; FUNCTION:  To copy files representing Options
  222. ;            To configure the installed option
  223. ;            To update the registry for the installed option
  224. ;
  225. ; INPUT:     $($0):  Language to use
  226. ;            $($1):  OptionID to install
  227. ;            $($2):  SourceDirectory
  228. ;            $($3):  AddCopy  (YES | NO)
  229. ;            $($4):  DoCopy   (YES | NO)
  230. ;            $($5):  DoConfig (YES | NO)
  231. ;
  232. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  233. ;                            STATUS_NOLANGUAGE |
  234. ;                            STATUS_USERCANCEL |
  235. ;                            STATUS_FAILED
  236. ;
  237.  
  238. [InstallOption]
  239.  
  240.     ;
  241.     ; Set default values for
  242.     ;
  243.     set Status       = STATUS_FAILED
  244.     set DrivesToFree = {}
  245.  
  246.     ;
  247.     ; extract parameters
  248.     ;
  249.     set Option   = $($1)
  250.     set SrcDir   = $($2)
  251.     set AddCopy  = $($3)
  252.     set DoCopy   = $($4)
  253.     set DoConfig = $($5)
  254.  
  255.     ;
  256.     ; Check if the language requested is supported
  257.     ;
  258.     set LanguageList = ^(LanguagesSupported, 1)
  259.     Ifcontains(i) $($0) in $(LanguageList)
  260.     else
  261.         set Status = STATUS_NOLANGUAGE
  262.         goto finish_InstallOption
  263.     endif
  264.     read-syms Strings$($0)
  265.  
  266.     ;
  267.     ; check to see if Option is supported.
  268.     ;
  269.  
  270.     set OptionList = ^(Options, 0)
  271.     ifcontains $(Option) in $(OptionList)
  272.     else
  273.         goto finish_InstallOption
  274.     endif
  275.     set OptionList = ""
  276.  
  277.     ;
  278.     ; Option has been defined already
  279.     ;
  280.     set MiniportDriver    = #(Options, $(Option), 1)
  281.     set BitsPerPel        = #(Options, $(Option), 2)
  282.     set XResolution       = #(Options, $(Option), 3)
  283.     set YResolution       = #(Options, $(Option), 4)
  284.     set VRefresh          = #(Options, $(Option), 5)
  285.     set Interlaced        = #(Options, $(Option), 6)
  286.  
  287.     set Type              = $(#(MiniportDrivers, $(MiniportDriver), 1))
  288.     set Group             =   #(MiniportDrivers, $(MiniportDriver), 2)
  289.     set ErrorControl      = $(#(MiniportDrivers, $(MiniportDriver), 3))
  290.     set Tag               =   #(MiniportDrivers, $(MiniportDriver), 4)
  291.     set InstalledDisplays =   #(MiniportDrivers, $(MiniportDriver), 5)
  292.     set VgaCompatible     =   #(MiniportDrivers, $(MiniportDriver), 6)
  293.     set EventMessageFile  =   #(MiniportDrivers, $(MiniportDriver), 7)
  294.     set TypesSupported    =   #(MiniportDrivers, $(MiniportDriver), 8)
  295.  
  296.     read-syms ServicesEntry
  297.     detect    ServicesEntry
  298.  
  299. installtheoption = +
  300.  
  301.     ;
  302.     ; Code to add files to copy list
  303.     ;
  304.  
  305.     ifstr(i) $(AddCopy) == "YES"
  306.         set DoActualCopy = NO
  307.         set FileToCheck = #(Files-DisplayMiniportDrivers, $(MiniportDriver), 2)
  308.         LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\drivers\"$(FileToCheck)
  309.         ifstr(i) $(STATUS) == NO
  310.             set DoActualCopy = YES
  311.             goto addfiles
  312.         endif
  313.         ForListDo $(InstalledDisplays)
  314.             set FileToCheck = #(Files-DisplayDLLs, $($), 2)
  315.             LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\"$(FileToCheck)
  316.             ifstr(i) $(STATUS) == NO
  317.                 set DoActualCopy = YES
  318.             endif
  319.         EndForListDo
  320.  
  321. addfiles = +
  322.         ifstr(i) $(DoActualCopy) == NO
  323.             shell "subroutn.inf" DriversExist $($0) $(String1)
  324.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  325.                 Debug-Output "VIDEO.INF: shelling DriversExist failed"
  326.                 goto finish_InstallOption
  327.             endif
  328.  
  329.             ifstr(i) $($R0) == STATUS_CURRENT
  330.             else-ifstr(i) $($R0) == STATUS_NEW
  331.                 set DoActualCopy = YES
  332.             else-ifstr(i) $($R0) == STATUS_USERCANCEL
  333.                 Debug-Output "VIDEO.INF: User cancelled video installation"
  334.                 goto finish_InstallOption
  335.             else
  336.                 Debug-Output "VIDEO.INF: Error reported in DriversExist routine in SUBROUTN.INF"
  337.                 goto finish_InstallOption
  338.             endif
  339.         endif
  340.  
  341.         ifstr(i) $(DoActualCopy) == YES
  342.  
  343.             shell "subroutn.inf" DoAskSourceEx $(SrcDir) $(String2)
  344.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  345.                 Debug-Output "VIDEO.INF: shelling DoAskSourceEx failed"
  346.                 goto finish_InstallOption
  347.             endif
  348.  
  349.             ifstr(i) $($R0) == STATUS_SUCCESSFUL
  350.                 set SrcDir = $($R1)
  351.                 ifstr(i) $($R2) != ""
  352.                     set DrivesToFree = >($(DrivesToFree), $($R2))
  353.                 endif
  354.             else
  355.                 Debug-Output "VIDEO.INF: User cancelled asking source."
  356.                 goto finish_InstallOption
  357.             endif
  358.  
  359.             install Install-AddCopyOption
  360.             ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS"
  361.                 Debug-Output "VIDEO.INF: Adding video files to copy list failed"
  362.                 goto finish_InstallOption
  363.             endif
  364.         else
  365.             set DoCopy = NO
  366.         endif
  367.  
  368.     endif
  369.  
  370.     ifstr(i) $(DoCopy) == "YES"
  371.         read-syms ProgressCopy$($0)
  372.         install Install-DoCopyOption
  373.         ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_FAILURE"
  374.             Debug-Output "Copying files failed"
  375.             goto finish_InstallOption
  376.         else-ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_USERQUIT"
  377.             set Status = STATUS_USERCANCEL
  378.             goto finish_InstallOption
  379.         endif
  380.     endif
  381.  
  382.     ifstr(i) $(DoConfig) == "YES"
  383.  
  384.         ;
  385.         ; first run a privilege check on modifying the setup node
  386.         ;
  387.  
  388.         shell "registry.inf" CheckSetupModify
  389.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  390.             goto finish_InstallOption
  391.         endif
  392.  
  393.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  394.             goto finish_InstallOption
  395.         endif
  396.  
  397.         ;
  398.         ; first make a new video entry, the entry is created automatically
  399.         ; enabled
  400.         ;
  401.  
  402.         set ServiceNode   = $(MiniportDriver)
  403.         set ServiceBinary = %SystemRoot%\System32\drivers\#(Files-DisplayMiniportDrivers, $(MiniportDriver), 2)
  404.  
  405.         set ServicesValues   = { +
  406.                 {Type,           0, $(!REG_VT_DWORD),     $(Type)                  }, +
  407.                 {Start,          0, $(!REG_VT_DWORD),     $(!SERVICE_SYSTEM_START) }, +
  408.                 {Group,          0, $(!REG_VT_SZ),        $(Group)                 }, +
  409.                 {ErrorControl,   0, $(!REG_VT_DWORD),     $(ErrorControl)          }, +
  410.                 {Tag,            0, $(!REG_VT_DWORD),     $(Tag)                   }, +
  411.                 {BinaryPathName, 0, $(!REG_VT_EXPAND_SZ), $(ServiceBinary)         }  +
  412.                 }
  413.  
  414.         set ParametersValues = { +
  415.                 {InstalledDisplayDrivers,     0, $(!REG_VT_MULTI_SZ), $(InstalledDisplays) }, +
  416.                 {VgaCompatible,               0, $(!REG_VT_DWORD),    $(VgaCompatible)     }, +
  417.                 {DefaultSettings.BitsPerPel,  0, $(!REG_VT_DWORD),    $(BitsPerPel)        }, +
  418.                 {DefaultSettings.XResolution, 0, $(!REG_VT_DWORD),    $(XResolution)       }, +
  419.                 {DefaultSettings.YResolution, 0, $(!REG_VT_DWORD),    $(YResolution)       }, +
  420.                 {DefaultSettings.VRefresh,    0, $(!REG_VT_DWORD),    $(VRefresh)          }, +
  421.                 {DefaultSettings.Interlaced,  0, $(!REG_VT_DWORD),    $(Interlaced)        }, +
  422.         {HardwareInformation.IoPort,  0, $(!REG_VT_DWORD),    736           }, +
  423.                 }
  424.  
  425.         set DeviceValues     = {}
  426.         set EventLogValues   = { +
  427.                 {EventMessageFile, 0, $(!REG_VT_EXPAND_SZ), $(EventMessageFile) }, +
  428.                 {TypesSupported,   0, $(!REG_VT_DWORD),     $(TypesSupported)   }  +
  429.                 }
  430.  
  431.         shell "registry.inf"  MakeServicesEntry $(ServiceNode)      +
  432.                                                 $(ServicesValues)   +
  433.                                                 $(ParametersValues) +
  434.                                                 $(DeviceValues)     +
  435.                                                 $(EventLogValues)   +
  436.                                                 Device0
  437.  
  438.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  439.             Debug-Output "Couldn't execute MakeServicesEntry in registry.inf"
  440.             goto finish_InstallOption
  441.         endif
  442.  
  443.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  444.             Debug-Output "MakeServicesEntry failed for video"
  445.             goto finish_InstallOption
  446.         endif
  447.  
  448.         ;
  449.         ;
  450.         ; then disable the previous video entry
  451.         ;
  452.  
  453.         ifstr(i) $(CurrentEntry) != $(MiniportDriver)
  454.             ifstr(i) $(CurrentEntry) != VGA
  455.                 ifstr(i) $(CurrentEntry) != ""
  456.                     shell "registry.inf" ModifyServicesEntry $(CurrentEntry) $(!SERVICE_DISABLED)
  457.  
  458.                     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  459.                         Debug-Output "Couldn't find DisableServicesEntry in registry.inf"
  460.                         goto errorconfig
  461.                     endif
  462.  
  463.                     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  464.                         Debug-Output "DisableServices entry failed"
  465.                     endif
  466.                 endif
  467.             endif
  468.         endif
  469.  
  470.         goto configdone
  471.  
  472. errorconfig = +
  473.         ifstr(i) $(CurrentEntry) != $(MiniportDriver)
  474.             shell "registry.inf" ModifyServicesEntry $(MiniportDriver) $(!SERVICE_DISABLED)
  475.             ifstr(i) $(CurrentEntry) != ""
  476.                 shell "registry.inf" ModifyServicesEntry $(CurrentEntry) $(!SERVICE_SYSTEM_START)
  477.             endif
  478.         endif
  479.         goto finish_InstallOption
  480.  
  481. configdone = +
  482.  
  483.     endif
  484.  
  485.     set Status = STATUS_SUCCESSFUL
  486.  
  487. finish_InstallOption = +
  488.     ForListDo $(DrivesToFree)
  489.         LibraryProcedure STATUS,$(!LIBHANDLE), DeleteNetConnection $($) "TRUE"
  490.     EndForListDo
  491.  
  492.     Return $(Status)
  493.  
  494.  
  495. [Install-AddCopyOption]
  496.  
  497.     set STF_VITAL = ""
  498.     ;
  499.     ; Add the files to the copy list
  500.     ;
  501.     AddSectionKeyFileToCopyList   Files-DisplayMiniportDrivers   +
  502.                                   $(MiniportDriver)              +
  503.                   ;$(SrcDir)              +
  504.                   $(SrcDir)"winnt\"              +
  505.                                   $(!STF_WINDOWSSYSPATH)\drivers
  506.  
  507.     ForListDo $(InstalledDisplays)
  508.     AddSectionKeyFileToCopyList   Files-DisplayDLLs      +
  509.                       $($)             +
  510.                       ;$(SrcDir)          +
  511.                       $(SrcDir)"winnt\"          +
  512.                       $(!STF_WINDOWSSYSPATH)
  513.  
  514.     EndForListDo
  515.  
  516.     exit
  517.  
  518.  
  519. [Install-DoCopyOption]
  520.  
  521.     ;
  522.     ; Copy files in the copy list
  523.     ;
  524.     CopyFilesInCopyList
  525.     exit
  526.  
  527. ;**************************************************************************
  528. ; PROGRESS GUAGE VARIABLES
  529. ;**************************************************************************
  530.  
  531. [ProgressCopyENG]
  532.     ProCaption   = "Windows NT Setup"
  533.     ProCancel    = "Cancel"
  534.     ProCancelMsg = "Windows NT is not correcly installed.  Are you sure you want "+
  535.                    "to cancel copying files?"
  536.     ProCancelCap = "Setup Message"
  537.     ProText1     = "Copying:"
  538.     ProText2     = "To:"
  539.  
  540. [StringsENG]
  541.     String1 = "Display"
  542.     String2 = "Please enter the full path to the 3D Blaster Display "+
  543.               "driver files.  Then choose Continue."
  544.  
  545. ;-----------------------------------------------------------------------
  546. ; SOURCE MEDIA DESCRIPTIONS
  547. ; -------------------------
  548. ; The OEM should list all the diskette labels here.  The source media
  549. ; description is used during copy to prompt the user for a diskette
  550. ; if the source is diskettes.
  551. ;
  552. ; Use 1 = "Diskette 1 Label" , TAGFILE = disk1
  553. ;     2 = "Diskette 2 Label" , TAGFILE = disk2
  554. ;     ...
  555. ;-----------------------------------------------------------------------
  556.  
  557. [Source Media Descriptions]
  558.     1  = "3D Blaster"  , TAGFILE = WINNT\disk1
  559.  
  560. [Files-DisplayDLLs]
  561. c3dnt = 1,c3dnt.DLL , SIZE=999
  562.  
  563. [Files-DisplayMiniportDrivers]
  564. c3dnt = 1,c3dnt.SYS , SIZE=999
  565.